package cn.team11.smarteye.contract;

import cn.team11.smarteye.base.BasePresenter;
import cn.team11.smarteye.base.BaseView;

/**
 * Created by Murphy on 2017/10/19.
 */

public interface LoginAndRegisterContract {

    interface View extends BaseView<Presenter> {

        void onLoginResult(int code);

        void onRegisterResult(int code);

        void onLoginTimeout();

        void showLoading();

        void hideLoading();

    }


    interface Presenter extends BasePresenter {

        /**
         * 通过手机号注册账号
         * */
        void registerByPhone(String phone, String verificationCode);

        /**
         * 获取手机验证码
         * */
        void getCodeByPhone(String phone);

        /**
         * 校验验证码
         * */
        void verifyCode(String phone, String code, String token);

        /**
         * 检测账号是否已经注册
         *
         * @param account
         */
        void checkAccountIsReg(String account);
    }
}
